home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 5.00 Object = "{9F485643-72B2-4DEC-8F9E-F2D2E296DA40}#1.0#0"; "MYSCREENCAPTURE.OCX" Begin VB.Form frmMain BorderStyle = 3 'Fixed Dialog Caption = "My ScreenCapture Quick demo 1.1 - (c) namtuk.com" ClientHeight = 5985 ClientLeft = 45 ClientTop = 435 ClientWidth = 8265 Icon = "frmMain.frx":0000 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False Picture = "frmMain.frx":1CFA ScaleHeight = 5985 ScaleWidth = 8265 StartUpPosition = 2 'CenterScreen Begin VB.CheckBox chkSaveDiskJPEG BackColor = &H00E3CDA4& Caption = "Save a copy in JPEG" Enabled = 0 'False Height = 225 Left = 315 TabIndex = 10 Top = 5145 Width = 2220 End Begin VB.CommandButton cmdQuit Caption = "Quit" Height = 435 Left = 2625 TabIndex = 9 Top = 5460 Width = 3900 End Begin VB.CheckBox chkSaveDisk BackColor = &H00E2C99F& Caption = "Save capture to disk (BMP)" Height = 330 Left = 105 TabIndex = 8 Top = 4725 Width = 2430 End Begin VB.CheckBox chkClipboard BackColor = &H00DFC296& Caption = "Send capture to clipboard" Height = 330 Left = 105 TabIndex = 7 Top = 4305 Width = 2430 End Begin VB.CommandButton cmdCaptureSpecific Caption = "Capture specific window" Height = 540 Left = 210 TabIndex = 6 Top = 3675 Width = 1905 End Begin VB.CommandButton cmdCaptureManual Caption = "Capture manually" Height = 540 Left = 210 TabIndex = 5 Top = 3045 Width = 1905 End Begin VB.CommandButton cmdCaptureZone Caption = "Capture predefined zone" Height = 540 Left = 210 TabIndex = 4 Top = 2415 Width = 1905 End Begin VB.CommandButton cmdCaptureActive Caption = "Capture Active window" Height = 540 Left = 210 TabIndex = 3 Top = 1785 Width = 1905 End Begin VB.CommandButton cmdCaptureFullScreen Caption = "Capture full screen" Height = 540 Left = 210 TabIndex = 2 Top = 1155 Width = 1905 End Begin VB.PictureBox Picture1 Appearance = 0 'Flat BackColor = &H80000005& ForeColor = &H80000008& Height = 4110 Left = 2625 ScaleHeight = 4080 ScaleWidth = 5550 TabIndex = 0 Top = 1260 Width = 5580 End Begin MyScreenCapture.MyCapture MyCapture1 Left = 2235 Top = 795 _ExtentX = 741 _ExtentY = 741 End Begin VB.Label Label3 Alignment = 2 'Center BackStyle = 0 'Transparent Caption = "This is a sample demo available only for Programmers and Developers. This is not a full application." BeginProperty Font Name = "Arial" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C0C0FF& Height = 960 Left = 4410 TabIndex = 11 Top = 0 Width = 3795 End Begin VB.Label Label1 Alignment = 2 'Center BackStyle = 0 'Transparent Caption = "Picture to show part of the capture sample" BeginProperty Font Name = "Tahoma" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00FFFFFF& Height = 330 Left = 2625 TabIndex = 1 Top = 1050 Width = 5580 End Attribute VB_Name = "frmMain" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Private Sub chkClipboard_Click() MyCapture1.SendToClipboard = chkClipboard.Value If chkClipboard.Value = 1 Then MsgBox "Now, the screen capture will be also send to clipboard", vbInformation + vbOKOnly, "Information" End If End Sub Private Sub chkSaveDisk_Click() MyCapture1.FileName = "c:\Test capture My ScreenCapture.bmp" MyCapture1.SendToDisk = chkSaveDisk.Value If chkSaveDisk.Value = 1 Then chkSaveDiskJPEG.Enabled = True MsgBox "Now, the screen capture will be also saved in c:\Test capture My ScreenCapture.bmp", vbInformation + vbOKOnly, "Information" Else chkSaveDiskJPEG.Enabled = False End If End Sub Private Sub chkSaveDiskJPEG_Click() 'Just to show example to save in JPEG format If chkSaveDiskJPEG.Value = 1 Then MsgBox "A copy of the screen capture will be also saved in c:\Test capture My ScreenCapture.jpg", vbInformation + vbOKOnly, "Information" End If End Sub Private Sub cmdCaptureFullScreen_Click() Set Picture1 = MyCapture1.CaptureFullScreen If chkSaveDiskJPEG.Value = 1 Then mSaveToJPEG End Sub Private Sub cmdCaptureActive_Click() Set Picture1 = MyCapture1.CaptureActiveWindows If chkSaveDiskJPEG.Value = 1 Then mSaveToJPEG End Sub Private Sub cmdCaptureZone_Click() MyCapture1.RegionX = 200 MyCapture1.RegionY = 200 MyCapture1.RegionWidth = 300 MyCapture1.RegionHeight = 300 Set Picture1 = MyCapture1.CaptureRegionAuto If chkSaveDiskJPEG.Value = 1 Then mSaveToJPEG End Sub Private Sub cmdCaptureManual_Click() Set Picture1 = MyCapture1.CaptureRegionManual If chkSaveDiskJPEG.Value = 1 Then mSaveToJPEG End Sub Private Sub cmdCaptureSpecific_Click() Set Picture1 = MyCapture1.CaptureSpecificWindows(Me.hwnd) If chkSaveDiskJPEG.Value = 1 Then mSaveToJPEG End Sub Private Sub cmdQuit_Click() End End Sub Private Sub mSaveToJPEG() '--------------------------------------------------------------------------------------- ' ##DateTime 13-Oct-2004 10:39 ' ##Update 13-Oct-2004 10:39 ' ##Summary Example of using the FREE dll from Intel to save in JPEG format ' ##Revision None '--------------------------------------------------------------------------------------- Dim c As New cDIBSection On Error Resume Next c.CreateFromPicture Picture1.Picture SaveJPG c, "c:\Test capture My ScreenCapture.jpg", 90 Set c = Nothing End Sub Private Sub Form_Load() Dim sMessageForEndUser As String sMessageForEndUser = "We inform you that the product you will try is a demonstration FOR DEVELOPMENT PURPOSE ONLY. It is not an application for final user." & vbCrLf & vbCrLf sMessageForEndUser = sMessageForEndUser & "Nous vous informons que le produit que vous allez tester est une d monstration pour les programmeurs uniquement. Ce n'est pas un programme pour utilisateur final." MsgBox sMessageForEndUser End Sub